.container
  #op_header
    %a#return_icon{:href => 'javascript:history.back();'}
      = image_tag "/root/icon_back.png"
    #header_title
      = @title
    %a#go_index{:href => '/'}
      = image_tag "/root/icon_index.png"

  #order_show_container
    .weui_cells_title
      订单信息
    .weui_cells#order_base_info
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            订单状态
        .weui_cell_bd.order_status
          = OrderHelper.get_order_state_text(@order_data['workflow_state'])
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            订单编号
        .weui_cell_bd.content
          = @order_data['orderno']
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            订单时间
        .weui_cell_bd.content
          = @order_data['created_at']
    .weui_cells_title
      收货信息
    .weui_cells#order_consignee_info
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            收货人
        .weui_cell_bd.content
          = @order_data['consignee']
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            手机号
        .weui_cell_bd.content
          = @order_data['telephone']
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            收货地址
        .weui_cell_bd.content
          = @order_data['address']
    .weui_cells_title
      配送信息
    .weui_cells#order_delivery_info
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            配送员
        .weui_cell_bd.content
          = @order_data['delivery_real_name']
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            手机号
        .weui_cell_bd.content
          %a{:href => "tel:#{@order_data['delivery_mobile']}",:style => "color:red;"}
            = @order_data['delivery_mobile']
    .weui_cells_title
      商品信息
    .weui_cells#product_list
      -@order_data['ordergoods'].each do |ordergood|
        .weui_cell
          %input{"type"=>"hidden","name"=>"product_id","value"=>"#{ordergood['product_id']}"}
          %input{"type"=>"hidden","name"=>"quantity","value"=>"#{ordergood['quantity']}"}
          .weui_cell_hd.product_img
            = image_tag ordergood['avatar_url']
          .weui_cell_bd.shoppingcart_info
            %p.product_title
              = ordergood['title']
            %span.product_number
              = "x#{ordergood['quantity']}"
          .weui_cell_ft.product_price
            = "¥ #{ordergood['price']}"
    .weui_cells_title
      支付信息
    .weui_cells#pay_info
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            支付方式
        .weui_cell_bd.content
          = "货到付款"
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            +运费
        .weui_cell_bd.cost
          = "¥ #{@order_data['fright']}"
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            商品总额
        .weui_cell_bd.cost
          = "¥ #{@order_data['goodsvalue']}"
      .weui_cell
        .weui_cell_hd
          %label.weui_label
            实付金额
        .weui_cell_bd.cost
          = "¥ #{@order_data['paycost']}"
  #order_show_op_footer
    - if !["cancelled","completed","receive"].include?(@order_data['workflow_state'])
      %a#order_cancel{:href => "javascript:jyd_dialog_confirm({content:\"确认取消当前订单吗？\",confirm_callback: function(){order_cancel('#{@order_data['id'].to_s}');}});"}
        = "取消订单"
    - if !["cancelled","completed","paid","generation"].include?(@order_data['workflow_state'])
      %a#order_confirm{:href => "javascript:order_confirm('#{@order_data['id'].to_s}');"}
        = "确认收货"
    -#%a#buy_again{:href => "javascript:buy_again();"}
    -#  = "再次购买"